const http = uni.$u.http;

// 查询设备运维列表
export function listMaintenance(query) {
    return http.request({
        url: '/iot/maintenance/list',
        method: 'get',
        params: query,
    });
}
export function alllList(query) {
    return http.request({
        url: '/iot/maintenance/alllList',
        method: 'get',
        params: query,
    });
}

// 查询设备运维详细
export function getMaintenance(maintenanceId) {
    return http.request({
        url: '/iot/maintenance/' + maintenanceId,
        method: 'get',
    });
}

// 新增设备运维
export function addMaintenance(data) {
    return http.request({
        url: '/iot/maintenance',
        method: 'post',
        data: data,
    });
}

// 修改设备运维
export function updateMaintenance(data) {
    return http.request({
        url: '/iot/maintenance',
        method: 'put',
        data: data,
    });
}
// 删除设备运维
export function delMaintenance(maintenanceId) {
    return http.request({
        url: '/iot/maintenance/' + maintenanceId,
        method: 'delete',
    });
}

// 查询水质统计列表
export function listWaterQuality(query) {
  return http.request({
    url: '/iot/WaterQuality/list',
    method: 'get',
    params: query
  })
}
// 查询水质统计详细
export function getWaterQuality(waterQualityId) {
  return http.request({
    url: '/iot/WaterQuality/' + waterQualityId,
    method: 'get'
  })
}

// 新增水质统计
export function addWaterQuality(data) {
  return http.request({
    url: '/iot/WaterQuality',
    method: 'post',
    data: data
  })
}

// 修改水质统计
export function updateWaterQuality(data) {
  return http.request({
    url: '/iot/WaterQuality',
    method: 'put',
    data: data
  })
}